package com.atguigu.gulimall.order.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.atguigu.gulimall.order.vo.OrderConfirmVo;
import com.atguigu.gulimall.order.vo.OrderSubmitResultVo;
import com.atguigu.gulimall.order.vo.OrderSumbitVo;
import com.atguigu.gulimall.order.vo.PayAsyncVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.text.ParseException;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author shujun
 * @email 961624576@qq.com
 * @date 2024-01-14 17:43:22
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo OrderConfirmInfo() throws ExecutionException, InterruptedException;

    OrderSubmitResultVo submitOrder(OrderSumbitVo sumbitVo);

    OrderEntity getByOrderSn(String orderSn);

    void releaseOrder(OrderEntity order);

    PageUtils queryPageWithOrderItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo payAsyncVo) throws ParseException;

    void handleSeckillOrder(SeckillOrderTo seckillOrderTo);
}

